package test.dao;

import java.util.List;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import test.entity.Theme;

public class ThemeDao extends HibernateDaoSupport{

	public void add(Theme theme) {
		this.getHibernateTemplate().save(theme);
	}

	public List<Theme> findAll() {
		String hql = "from Theme";
		 List<Theme> list = this.getHibernateTemplate().find(hql);
		 if(list.size()>0&&list!=null){
			 return list;
		 }
		return null;
	}

}
